{% extends 'admin/common/base.html' %}
{% block css %}
{{super()}}
<link href="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.css')}}?v=3.1.3" rel="stylesheet" />
<link href="{{url_for('admin.static',filename='ajax/libs/summernote/summernote.css')}}" rel="stylesheet" />
<link href="{{url_for('admin.static',filename='ajax/libs/summernote/summernote-bs3.css')}}" rel="stylesheet" />
<link href="{{url_for('admin.static',filename='ajax/libs/datapicker/bootstrap-datetimepicker.min.css')}}" rel="stylesheet" />
<link href="{{url_for('admin.static',filename='ajax/libs/jsonview/jquery.jsonview.css')}}?v=1.2.0" rel="stylesheet"/>
{% endblock %}
{% block body %}

<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m-t" id="signupForm">
            <div class="form-group">
                <label class="col-sm-2 control-label">操作模块：</label>
                <div class="form-control-static">{{d.title}} / {{d.opt_name}}</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">登录信息：</label>
                <div class="form-control-static">{{d.oper_name}} / {{d.ipaddr}} / {{d.login_location}}</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">请求地址：</label>
                <div class="form-control-static">{{d.oper_url}}</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">请求方式：</label>
                <div class="form-control-static">{{d.request_method}}</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">操作方法：</label>
                <div class="form-control-static">{{d.method}}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">请求参数：</label>
                <textarea id="oper_param" style="display: none;">{{d.oper_param | safe}}</textarea>
                <div class="form-control-static">
                    <pre id="operParam"></pre>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">返回数据：</label>
                <textarea id="json_result" style="display: none;">{{(d.json_result | safe) if d.is_json_result else d.json_result}}</textarea>
                <div class="form-control-static">
                    <pre id="jsonResult"></pre>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">状态：</label>
                <div class="label label-primary">{{d.state}}</div>
            </div>
        </form>
    </div>
</body>
{% endblock %}
{% block js %}
{{ super() }}
<script src="{{url_for('admin.static',filename='ajax/libs/jasny/jasny-bootstrap.min.js')}}?v=3.1.3"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/summernote/summernote.min.js')}}"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/summernote/summernote-zh-CN.js')}}"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/datapicker/bootstrap-datetimepicker.min.js')}}"></script>
<script src="{{url_for('admin.static',filename='ajax/libs/jsonview/jquery.jsonview.js')}}?v=1.2.0"></script>
<script>
    $(function() {
        let is_json_result = {{d.is_json_result | tojson | safe}};
        var operParam = $('#oper_param').val();
        if ($.common.isNotEmpty(operParam) && operParam.length < 2000) {
            $("#operParam").JSONView(operParam);
        } else {
            $("#operParam").text(operParam);
        }
        var jsonResult = $('#json_result').val();
        if ($.common.isNotEmpty(jsonResult) && is_json_result) {
            $("#jsonResult").JSONView(jsonResult);
        } else {
            $("#jsonResult").text(jsonResult);
        }
    });
</script>
{% endblock %}